package org.me.marble;

import android.view.KeyEvent;

/**
 *
 * @author tungi
 */

public class OptionsLibrary{
	public static final int MAX_DIFFICULTY=5;
//#####################################SAVES####################################
    //global
	public static int bestNormal=0;//points
    public static int bestPoint=0;
    public static float bestTime=0;
    public static int reached_level=1;
    public static boolean started=false;
    public static String game_type="normal";
    //local - in one game
    public static int lifes=3;
    public static float points=0;
    public static boolean fog=false;
    public static int current_level=1;    
    public static int difficulty_level=1;
    
//####################################OPTIONS###################################
    public static boolean fps=true;
    public static boolean sound=false;
    public static boolean vibrate=true;

    //controls options
    public static boolean onscreen=false;
    public static boolean tilt_control=false;
    public static float tilt_orientation=0.0f;

    public static int left_key=KeyEvent.KEYCODE_DPAD_LEFT;    
    public static int right_key=KeyEvent.KEYCODE_DPAD_RIGHT;

    public static int key_sensitivity=5;
    public static int tilt_sensitivity=10;

    //graphics options
    public static boolean shadow=false;
    public static String graphics_quality="high";
    public static String objects_quality="medium";
    public static String texture_quality="low";

//###############################LEVEL SPEC#####################################
    
    public static float speedMult=1.0f;
    public static float pointMult=1.0f;
    
//#############################STATIC METHODS###################################
    public static void setNewLevel(){
    	fog=false;
    	speedMult=1.0f;
    	pointMult=1.0f;  
    }
    
    public static void setSavesToDefault(){
        lifes=3;
        points=0;        
        started=false;
        current_level=1;
    }
    
    public static void eraseSaves(){    	
        lifes=3;
        points=0;
        started=false;
        current_level=1;
        reached_level=1;
        bestNormal=0;
        bestPoint=0;
        bestTime=0;       
    }

    public static void restoreDefaultSettings(){
        fps=true;
        sound=true;
        vibrate=true;
        onscreen=false;
        tilt_control=false;
        tilt_orientation=0.0f;
        left_key=KeyEvent.KEYCODE_DPAD_LEFT;
        right_key=KeyEvent.KEYCODE_DPAD_RIGHT;
        key_sensitivity=5;
        tilt_sensitivity=10;
        shadow=false;
        graphics_quality="high";
        objects_quality="medium";
        texture_quality="low";
    }
}
